<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://localhost:8080/Website/" />
<title>ModifyReservationSC1TC2</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">ModifyReservationSC1TC2</td></tr>
</thead><tbody>
<!--Created by Steven Chow-->
<!--Use Case: Modify Reservation-->
<!--Scenario 1: Successful Modification-->
<!--Test Case 2 Change Flight-->
<!---->
<!--Go to website-->
<tr>
	<td>open</td>
	<td>http://localhost:8080/Website/</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<!--Login-->
<tr>
	<td>type</td>
	<td>name=username</td>
	<td>User4</td>
</tr>
<tr>
	<td>type</td>
	<td>name=password</td>
	<td>pass4</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--We in Customer portal?-->
<tr>
	<td>assertTitle</td>
	<td>Customer Portal</td>
	<td></td>
</tr>
<!--Check if we have the correct amount of Loyalty Points-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div[2]/a[2]/div/div/h2</td>
	<td>800 pts</td>
</tr>
<!--Check if we are on the Reservation List Page-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-blue &gt; div.tile-content.icon &gt; img</td>
	<td></td>
</tr>
<tr>
	<td>assertTitle</td>
	<td>Reservation List</td>
	<td></td>
</tr>
<!--Check if our reservation is there-->
<tr>
	<td>assertTextPresent</td>
	<td>Hot Girl</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>name=r1</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>name=view</td>
	<td></td>
</tr>
<!--Check if shit is there-->
<tr>
	<td>assertTextPresent</td>
	<td>200.0</td>
	<td></td>
</tr>
<!---->
<!--Change from Flight 1001 to Flight 1002-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div[2]/div/div/table/tbody/tr</td>
	<td>Hot Girl E10 Business vegetarian</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if you get a pay telling u that you will get a refund-->
<tr>
	<td>assertTextPresent</td>
	<td> You will be refunded with 0.0 and 200 points</td>
	<td></td>
</tr>
<!--Click OK-->
<tr>
	<td>clickAndWait</td>
	<td>name=OK</td>
	<td></td>
</tr>
<!---->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='r1'])[3]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div &gt; input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Are we in the Reservation page?-->
<tr>
	<td>assertTextPresent</td>
	<td>Reservation</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=firstName</td>
	<td>Hot </td>
</tr>
<tr>
	<td>type</td>
	<td>name=lastName</td>
	<td>Girl</td>
</tr>
<tr>
	<td>type</td>
	<td>name=seatID</td>
	<td>C26</td>
</tr>
<tr>
	<td>click</td>
	<td>//div[@id='page1']/div/label[3]/span</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='mealOption'])[3]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>name=point</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=point</td>
	<td>100</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we have the correct amount of Loyalty Points-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div[2]/a[2]/div/div/h2</td>
	<td>900 pts</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-blue &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>name=r1</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>name=view</td>
	<td></td>
</tr>
<!--Make an  assertion here -->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div[2]/div/div/table/tbody</td>
	<td>Hot Girl C26 Economy Vegetarian</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>//a[contains(@href, '/Website/BackButtonURL?username=User4')]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if flight 1001 has #of seats remaining back to 122-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr[2]</td>
	<td>1001 2012-10-10 14:00 2012-10-09 18:00 Air Canada Los Angeles Vancouver 200.0 122</td>
</tr>
</tbody></table>
</body>
</html>
